// 长度为l,如果右边比左边大, 左边收缩,
// 把集合平均值转换为lnx相加的方式
const readline = require("readline");
const rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout
});
let n, l;
let initArr = [];
rl.on("line", (line)=>{
    if(n === undefined){
        [n, l] = line.trim().split(" ").map(Number)
    } else {
        initArr.push(Number(line.trim()))
        if(initArr.length === n) {
            getResult(n, l, initArr)
            //clear
            n = l = undefined
            initArr.length = 0
        }

    }
})

function getResult(n, l, initArr) {
    initArr.map((val, index) => Math.log(val))
    let left = 0
    let right = 0
    let bestLength = Infinity
    let max = -Infinity
    let ans = []

    let sum = initArr[0]
    while(left <= right && right < initArr.length) {
        let length = right - left + 1
        const avg = sum/length
        while(length >= l) {
            if(avg > max) {
                max = avg
                ans = [left, right]
                bestLength = length
            } else if(avg === max && length < bestLength){
                ans = [left, right]
                bestLength =length
            } else if (avg === max && length === bestLength && left < ans[0]) {
                ans = [left, right]
                bestLength =length
            }
            if(initArr[right] >= initArr[left]) {
                sum -= initArr[left]
                left++
                length--
            } else {
                break
            }
        }
        right++
        sum+=initArr[right]
    }
    console.log(ans[0], ans[1] - ans[0] + 1)
}